package com.qf.sportsevent.util;

/**
 * Created by Administrator on 2016/12/15.
 */

public class UrlManager {
    //新闻
    //标题
    public final static String TitlesUrl = "http://api.lifxapi.com/tiyu/rest/channel/list?version=0&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    //推荐（GET）
    public final static String TuijianUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=0&contest_flag=true&data_version=397.3&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //中国篮球（GET）
    public final static String ChinaBaseketballUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=9&data_version=59.6&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //国际足球（GET）
    public final static String FootballUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=1&data_version=216.9&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //NBA（GET）
    public final static String NBAUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=2&data_version=155.8&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //综合（GET）
    public final static String SynthesizeUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=7&data_version=137.4&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //中国足球（GET）
    public final static String ChinaFootball = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=8&data_version=187.9&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //竞猜（GET）
    public final static String GuessUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=13&data_version=4.0&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //深度（GET）
    public final static String DepthUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=10&data_version=13.2&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //高尔夫（GET）
    public final static String GolfUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=6&data_version=5.7&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //羽毛球（GET）
    public final static String BadmintonUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=5&head_version=0.0&data_version=10.6&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //网球（GET）
    public final static String TennisUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=3&data_version=23.2&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //图说（GET）
    public final static String DescriptionUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=11&data_version=10.6&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //铿锵玫瑰（GET）
    public final static String SteelRosesUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=20&data_version=10.1&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //最董球
    public final static String ZuidongqiuUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=19&data_version=2.4&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //视频（GET）
    public final static String VideoUrl = "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=12&data_version=112.4&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    //电竞（GET）
    public final static String AllstarUrl= "http://api.lifxapi.com/tiyu/rest/content/list?channel_id=17&head_version=0.0&data_version=2.2&banner_flag=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";

    public static String[] urlList=new String[]{TitlesUrl,TuijianUrl,ChinaBaseketballUrl,FootballUrl,NBAUrl,SynthesizeUrl,
            ChinaFootball,GuessUrl,DepthUrl,GolfUrl,BadmintonUrl,TennisUrl,DescriptionUrl,SteelRosesUrl,ZuidongqiuUrl,VideoUrl,AllstarUrl};

    /**
     * 根据ID获取URL的方法
     */
    public static String getNewsUrlById(int id){
        for (int i = 0; i < urlList.length; i++) {
            String url = urlList[i];
            if(url.contains("channel_id="+id)){
                return url;
            }
        }
        return null;
    }

    /**
     *ViewPager的图片地址
     */
    public static String getViewPagerImageUrl(String imageUrl){
        return "http://lifeixphoto.qiniudn.com/"+imageUrl+"?imageView2/1/w/864/h/555/format/jpg";
    }

    /**
     *普通Item的图片地址
     */
    public static String getCommonImageUrl(String imageUrl){
        return "http://lifeixphoto.qiniudn.com/"+imageUrl+"?imageView2/1/w/300/h/225/format/jpg";
    }

    /**
     *三张图片的图片地址
     */
    public static String getThreeImageUrl(String imageUrl){
        return "http://lifeixphoto.qiniudn.com/"+imageUrl+"?imageView2/1/w/339/h/270/format/jpg";
    }

    /**
     *LOGO地址
     */
    public static String getLogoUrl(String logoUrl){
        return "http://roi.skst.cn/logo/"+logoUrl;
    }

    /**
     *NewsDetailActivity  item  banners type=2
     */
    public static String getCommonNewsUrl(int id ){
        return "http://api.lifxapi.com/tiyu/rest/content/view?code=865682026799303&id="+id+"&s_channel_id=0&comment=true&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    }

    /**
     *NewsSpecialActivity banners type=4
     */
    public static String getSpecialNewsUrl(int link){
        return "http://api.lifxapi.com/tiyu/rest/content/topic?code=865682026799303&id="+link+"&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    }

    /**
     *下方ListView接口
     */
    public static String getListNewsUrl(int id ){
        return "http://api.lifxapi.com/tiyu/rest/content/recommend?id="+id +"&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    }

    /**
     * 评论列表URL
     */
    public static String getCommentUrl(int dashboard_id){
        return "http://api.lifxapi.com/tiyu/rest/comment/list?dashboard_id="+dashboard_id+"&limit=20&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    }

    /**
     *评论数量URL
     */
    public static String getCommentNumUrl(int dashboard_data){
        return "http://api.lifxapi.com/tiyu/rest/comment/num?dashboard_type=10&dashboard_data="+dashboard_data+"&machine_code=865682026799303&client=key%3ATiyuForAndroid&version=2.11&format=json&app_id=4&is_emulator=false";
    }


}
